package com.bao.work.other;

public class Test03 {


    public static void main(String[] args) {
        Snake snake=new Snake("老蛇",55,5);
        Centipede centipede=new Centipede("蜈蚣",55,3);
        snake.hit(centipede);
        centipede.lifeUp();
        snake.move();
        centipede.move();
        centipede.hit(snake);
        System.out.println(snake.life);
        System.out.println(centipede.life);
    }
}
